//
//  FLMHomeItemCell.m
//  FLMSuperS
//
//  Created by xiaoyang on 16/9/19.
//  Copyright © 2016年 FaLaoMiaoNetworkTechnologyCo. All rights reserved.
//

#import "FLMHomeItemCell.h"
#import "FLMHomeView.h"
#import "FLMHomeResponseModel.h"
@interface FLMHomeItemCell()
{
    CGRect itemFrame;
}
@property (nonatomic, strong) FLMHomeView * homeShopV;//商品单位视图

@end

@implementation FLMHomeItemCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        itemFrame = frame;
        [self layoutUI];
    }
    
    return self;
}

- (void)layoutUI
{
    _homeShopV = [[FLMHomeView alloc]initWithFrame:CGRectMake(0, 0, itemFrame.size.width, itemFrame.size.height)];
    [self.contentView addSubview:_homeShopV];
}

- (void)configueCellWithModel:(FLMGoodslistModel *)goodModels  indexPath:(NSIndexPath *)indexPath
{
    //商品主图
    [_homeShopV.imgV sd_setImageWithURL:[NSURL URLWithString:goodModels.pict_url] placeholderImage:[UIImage imageNamed:@"1"]];
    //标题
    _homeShopV.titleL.text = goodModels.title;
    // 商品价格
    _homeShopV.priceL.text = [NSString stringWithFormat:@"￥%@",goodModels.zk_final_price];
    // 商品销量
    _homeShopV.numL.text = [NSString stringWithFormat:@"已售:%@",goodModels.volume];
    
}

@end
